package com.example.controller;

import com.example.client.HiClient;
import com.netflix.discovery.converters.Auto;
import feign.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @Author wangyaohan
 * @Date 2021/9/9 10:59
 * @ClassName HiController
 */
@RestController
@RequestMapping("user")
public class HiController {

    @Autowired
    private RestTemplate restTemplate;

    @Resource
    private HiClient hiClient;

    @RequestMapping("/s")
    public  String hi(@PathVariable("id") Long id){
        hiClient.hi(id);
        return "张三";
    }
    @RequestMapping("/find")
    public String find(){
        String s = hiClient.find();

        return s;
    }

}
